﻿<UserControl x:Class="P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear.FiFiscalYearsListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/CuberryDataGrid.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>


    <Grid VerticalAlignment="Stretch">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="44" />
            <RowDefinition Height="Auto" MinHeight="24"/> 
        </Grid.RowDefinitions>

        <DataGrid Grid.Row ="0" ItemsSource="{Binding}" 
                     Name="FiFiscalYearsList"
                     SelectionChanged="FiFiscalYearsList_SelectionChanged" 
                     MouseDoubleClick="FiFiscalYearsList_DblClick" 
                     Style="{DynamicResource CuberryDataGridStyle}"
                     VerticalAlignment="Stretch" >
            
            <DataGrid.Columns>
                <DataGridTextColumn Header="{Translate FiscalYearNameL}" Binding="{Binding Path=FiscalYearName}" MinWidth="25" Width="100" />
                <DataGridTextColumn Header="{Translate FiscalYearStartDateL}" Binding="{Binding Path=FiscalYearStartDate, StringFormat=dd/MM/yyyy}" MinWidth="40" Width="180" /> 
                <DataGridTextColumn Header="{Translate FiscalYearEndDateL}" Binding="{Binding Path=FiscalYearEndDate, StringFormat=dd/MM/yyyy}" MinWidth="40" Width="180" />
                <DataGridTextColumn Header="{Translate StatusNameL}" Binding="{Binding Path=StatusName, Mode=OneWay}" MinWidth="40" Width="*" IsReadOnly="True" />
                

            </DataGrid.Columns>
        </DataGrid>
    
</Grid>
</UserControl>
